import 'package:flutter/material.dart';

class CustomViewPanel{
  static Widget buildView(Widget view, {
    double margin = 0,
    double marginTop = 0,
    double marginBottom = 0,
    double marginLeft = 0,
    double marginRight = 10,
    double padding = 0,
    double paddingTop = 0,
    double paddingBottom = 0,
    double paddingLeft = 0,
    double paddingRight = 0,}){
    return Container(
      padding: padding > 0 ? EdgeInsets.all(padding) : EdgeInsets.only(left: paddingLeft,right: paddingRight,top: paddingTop,bottom: paddingBottom),
      margin: margin > 0 ? EdgeInsets.all(margin) : EdgeInsets.only(left: marginLeft,right: marginRight,top: marginTop,bottom: marginBottom),
      child: view,
    );
  }

  static Widget buildViewByWidth(Widget view,double width){
    return Container(
      width: width,
      child: view,
    );
  }

  static Widget buildViewByHeight(Widget view,double height){
    return Container(
      height: height,
      child: view,
    );
  }

  static Widget buildViewByHeightR10(Widget view,double height){
    return Container(
      height: height,
      margin: EdgeInsets.only(right: 10),
      child: view,
    );
  }
}